package com.example.designPatterns.chain;

import java.util.ArrayList;
import java.util.List;

/**
 * @Title: TestChain
 * @Description: TODO
 * @Date 2019/8/1 20:29
 */
public class TestChain {


    public static String processor() {
        List<HandleChain> handleChainList = new ArrayList<>();
        handleChainList.add(new SecondChain());
        handleChainList.add(new FirstChain());
        String r = null;
        for (HandleChain f : handleChainList) {
            r = f.doFilter(r);
        }
        return r;
    }

    public static void main(String[] args) {
        processor();
    }

}
